const commonRoutes = [
  {
    path: "applyFor", // 发薪申请
    meta: {
      route: "/paySalary/applyFor",
      routeSession: "paySalaryPage"
    },
    component: () => import("@/views/paySalary/applyFor")
  },
  {
    path: "add", // 添加
    name: "applyForAdd",
    meta: {
      route: "/paySalary/applyFor",
      routeSession: "paySalaryPage"
    },
    component: () => import("@/views/paySalary/applyFor/add")
  },
  // {
  //   path: "abnormal", // 异常
  //   name: "applyForAbnormal",
  //   component: () => import("@/views/paySalary/applyFor/abnormal")
  // },
  {
    path: "info", // 详情
    name: "applyForInfo",
    meta: {
      route: "/paySalary/applyFor",
      routeSession: "paySalaryPage"
    },
    component: () => import("@/views/paySalary/applyFor/info")
  },
  {
    path: "results", // 状态
    name: "applyForResults",
    meta: {
      route: "/paySalary/applyFor",
      routeSession: "paySalaryPage"
    },
    component: () => import("@/views/paySalary/applyFor/results")
  },
  {
    path: "examine", // 发薪审批
    meta: {
      route: "/paySalary/examine",
      routeSession: "paySalaryPage"
    },
    component: () => import("@/views/paySalary/examine")
  },
  {
    path: "examineDetail", // 发薪审批详情
    meta: {
      // route: "/paySalary/examine"
    },
    component: () => import("@/views/paySalary/examine/examineDetail")
  },
  {
    path: "pay", // 薪资发放
    meta: {
      route: "/paySalary/pay",
      routeSession: "paySalaryPage"
    },
    component: () => import("@/views/paySalary/pay")
  },
  {
    path: "authorization", // 薪资发放
    meta: {
      route: "/paySalary/pay",
      routeSession: "paySalaryPage"
    },
    component: () => import("@/views/paySalary/pay/authorization")
  },
  // {
  //   path: "payDetail", // 发薪详情
  //   component: () => import("@/views/paySalary/pay/payDetail")
  // },
  {
    path: "people", // 发现人员库
    meta: {
      route: "/paySalary/people",
      routeSession: "paySalaryPage"
    },
    component: () => import("@/views/paySalary/people")
  },
  {
    path: "merchant", // 账号权限
    meta: {
      route: "/paySalary/merchant",
      routeSession: "paySalaryPage"
    },
    component: () => import("xqjr-module-console/views/businessConfig/paySalary.vue")
  }
];

export default {
  path: "/paySalary", // 人事管理
  component: () => import("@/views/paySalary"),
  redirect: "/paySalary/applyFor",
  children: [].concat(commonRoutes)
};
